Skip to content

test(proc): pace the groupAlive test's signals and count them - #17

Merged
HaoZeke merged 1 commit into
mainfrom
fix/group-alive-test-speed
Nov 16, 2026
Merged

HaoZeke merged 1 commit into
mainfrom
fix/group-alive-test-speed

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

The test that groupAlive stays true while signals arrive sent SIGUSR1 from its helper thread in a tight loop. A signal was always pending, so every system call in the /proc scan was followed by a signal delivery, and the test took 40 to 83 s natively and 4 to 8 minutes for aarch64 under QEMU, against 20 ms pinned to one CPU.

The helper now pauses 1 ms per signal, as the state.lockExclusive test does, and the handler counts the signals it catches. The test still makes its 50 checks, each expecting true, and goes on until ten of them have caught a signal mid-scan. It fails after 10 s if signals stop landing, so it cannot pass without having been interrupted.

It now takes about 16 ms natively and 0.1 s under QEMU. The suite drops from 67 to 115 s to 37 s natively, and from 311 s to 48 s under QEMU.

The helper thread sent SIGUSR1 back to back, so a signal was always
pending and the scan took one after every system call: the test took
40 to 80 s on eight CPUs and 4 to 8 minutes for aarch64 under QEMU,
where pinned to one CPU it took 20 ms. It now pauses 1 ms per signal,
as the state.lockExclusive test does, and takes 16 ms, 0.1 s under
QEMU.

The handler counts the signals it catches. The test still makes its 50
checks, every one expected true, and goes on until 10 of them have
caught a signal mid-scan, so it fails, after 10 s, rather than passes
when none lands.
@HaoZeke
HaoZeke merged commit baabeac into main Nov 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant